package com.example.echarts.controller;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.echarts.entity.WorldAsiangameInfo;
import com.example.echarts.service.IAsiangameCountInfoService;
import com.example.echarts.service.IWorldAsiangameInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaowei
 * @since 2022-05-04
 */
@RestController
@RequestMapping("/worldAsiangameInfo")
public class WorldAsiangameInfoController {
    @Autowired
    IWorldAsiangameInfoService iWorldAsiangameInfoService;
    @RequestMapping("getall")
    public List<WorldAsiangameInfo> getall(){
        QueryWrapper<WorldAsiangameInfo> worldAsiangameInfoQueryWrapper= new QueryWrapper<>();
        worldAsiangameInfoQueryWrapper.select("year","country","total_medal");
        List<WorldAsiangameInfo> result = iWorldAsiangameInfoService.getBaseMapper().selectList(worldAsiangameInfoQueryWrapper);
        return result;
    }
}

